﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Curry.Forum.Command.Domain.Core
{
    public class Article
    {
        /// <summary>
        /// 文章ID
        /// </summary>
        //public int Id { get; set; }
        /// <summary>
        /// 文章标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 文章内容
        /// </summary>
        public string ArticleContent { get; set; }
        /// <summary>
        /// 作者
        /// </summary>
        public string Author { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Createdon { get; set; }
        /// <summary>
        /// 上次更新时间
        /// </summary>
        public DateTime LastUpdateTime { get; set; }
        /// <summary>
        /// 作者Id
        /// </summary>
        public int AuthorId { get; set; }
        /// <summary>
        /// 类别
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// 标签
        /// </summary>
        public string Tag { get; set; }

        public const string InsertSql = @"INSERT INTO Article
                                                       (
                                                          Title,
                                                          ArticleContent,
                                                          Author,
                                                          AuthorId,
                                                          Type,
                                                          Tag,
                                                          Createdon,
                                                          LastUpdateTime
                                                        )
                                                        VALUES
                                                          (
                                                            @Title,
                                                            @ArticleContent,
                                                            @Author,
                                                            @AuthorId,
                                                            @Type,
                                                            @Tag,
                                                            @Createdon,
                                                            @LastUpdateTime
                                                          )";

    }
}
